---
description: Hasura GraphQL Engine Server Configuration Reference (Flags/Environment variables)
keywords:
  - hasura
  - docs
  - deployment
  - server
  - config
  - flags
  - env vars
  - environment variables
sidebar_position: 2
sidebar_label: Server configuration reference
---

# GraphQL Engine Server Configuration Reference

<div className="server-reference-tables">

## Introduction

This page details which flags and environment variables are available to customize a Hasura GraphQL Engine instance. For
details on how to implement flags or environment variables, check out
[this page](/deployment/graphql-engine-flags/index.mdx).

## GraphQL Engine command flags and environment variables

For the [`graphql-engine` command](/deployment/graphql-engine-flags/index.mdx#the-graphql-engine-command), these are the
available flags and environment variables:

### Database URL

This connection string can be used to connect Hasura to a PostgreSQL data source which Hasura will automatically add to
the list of connected data sources.

|                     |                                                        |
| ------------------- | ------------------------------------------------------ |
| **Flag**            | `--database-url <DB_URL>`                              |
| **Env var**         | `HASURA_GRAPHQL_DATABASE_URL`                          |
| **Accepted values** | String (PostgreSQL DB connection string)               |
| **Example**         | `postgres://<user>:<password>@<host>:<port>/<db-name>` |
| **Default**         | `null`                                                 |
| **Supported in**    | CE, Enterprise Edition                                 |

:::info Note

This config option is supported to maintain backwards compatibility with `v1.x` Hasura instances. **In versions `v2.0`
and above, databases can be connected using any custom environment variables of your choice. Our `docker-compose.yaml`
files in the install manifests reference `PG_DATABASE_URL` as the environment variable to use for connecting to a
database, but this can be any plaintext value which does not start with `HASURA_`.**

:::

### Metadata Database URL

This Postgres database URL is used to store Hasura's Metadata. This can also be a URI of the form
`dynamic-from-file:///path/to/file`, where the referenced file contains a postgres connection string, which will be read
dynamically every time a new connection is established. This allows the server to be used in an environment where
secrets are rotated frequently.

|                     |                                                                             |
| ------------------- | --------------------------------------------------------------------------- |
| **Flag**            | `--metadata-database-url <METADATA_DATABASE_URL>`                           |
| **Env var**         | `HASURA_GRAPHQL_METADATA_DATABASE_URL`                                      |
| **Accepted values** | String (PostgreSQL DB connection string, or `dynamic-from-file://` URI)     |
| **Example**         | `postgres://<user>:<password>@<host>:<port>/<db-name>`                      |
| **Default**         | **CE, Enterprise Edition**: `null` <br />**Cloud**: managed by Hasura Cloud |
| **Supported in**    | CE, Enterprise Edition                                                      |

:::info Note

THe metadata database URL needs to be set for Hasura to start.

:::

## Serve sub-command flags and environment variables {#command-flags}

For the [`serve` sub-command](/deployment/graphql-engine-flags/index.mdx#the-serve-sub-command), these are the available
flags and environment variables:

:::info Note

When the equivalent flags for environment variables are used, the flags will take precedence.

:::

### Admin Internal Errors

Internal information is included in an error response for requests made by an admin.

|                     |                                           |
| ------------------- | ----------------------------------------- |
| **Flag**            | `--admin-internal-errors <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_ADMIN_INTERNAL_ERRORS`    |
| **Accepted values** | Boolean                                   |
| **Options**         | `true` or `false`                         |
| **Default**         | `true`                                    |
| **Supported in**    | CE, Enterprise Edition, Cloud             |

### Admin Secret Key

A [secret key](/deployment/securing-graphql-endpoint.mdx) required to access the Hasura instance.

|                     |                                                                        |
| ------------------- | ---------------------------------------------------------------------- |
| **Flag**            | `--admin-secret <ADMIN_SECRET_KEY>`                                    |
| **Env var**         | `HASURA_GRAPHQL_ADMIN_SECRET`                                          |
| **Accepted values** | String                                                                 |
| **Default**         | **CE, Enterprise Edition**: null <br />**Cloud**: generated by default |
| **Supported in**    | CE, Enterprise Edition, Cloud                                          |

:::info Note

When you use [webhook or JWT mode for authentication](/auth/authentication/index.mdx), setting this value is mandatory.

:::

### Admin Secrets

A list of valid admin [secret keys](/auth/authentication/multiple-admin-secrets.mdx) any one of which can be used to
access the Hasura instance.

|                     |                                |
| ------------------- | ------------------------------ |
| **Flag**            | `--admin-secrets <SECRETS>`    |
| **Env var**         | `HASURA_GRAPHQL_ADMIN_SECRETS` |
| **Accepted values** | Array (of strings)             |
| **Default**         | `null`                         |
| **Example**         | `'["secret1", "secret2"]'`     |
| **Supported in**    | Enterprise Edition only        |

:::info Note

If both Admin Secret and Admin Secrets are set, then only Admin Secrets will be used.

:::

### Async Actions Fetch Batch Size

The maximum number of async actions to be processed in a single batch.

|                     |                                                 |
| ------------------- | ----------------------------------------------- |
| **Flag**            | `--async-actions-fetch-batch-size <BATCH_SIZE>` |
| **Env var**         | `HASURA_GRAPHQL_ASYNC_ACTIONS_FETCH_BATCH_SIZE` |
| **Accepted values** | Integer                                         |
| **Default**         | `10`                                            |
| **Supported in**    | CE, Enterprise Edition, Cloud                   |

### Async Actions Fetch Interval

The interval, in milliseconds, to sleep before trying to fetch [async actions](/actions/async-actions.mdx) again after a
fetch returned no async actions from metadata storage. A value of `0` implies completely disabling fetching async
actions from the storage.

|                     |                                                    |
| ------------------- | -------------------------------------------------- |
| **Flag**            | `--async-actions-fetch-interval <INTERVAL_IN_MS>`  |
| **Env var**         | `HASURA_GRAPHQL_ASYNC_ACTIONS_FETCH_INTERVAL`      |
| **Accepted values** | Integer (Representing an interval in milliseconds) |
| **Default**         | `null`                                             |
| **Supported in**    | CE, Enterprise Edition, Cloud                      |

### Auth Hook

The URL required to authorize requests when utilizing [authentication webhooks](/auth/authentication/webhook.mdx).

|                     |                               |
| ------------------- | ----------------------------- |
| **Flag**            | `--auth-hook <WEBHOOK_URL>`   |
| **Env var**         | `HASURA_GRAPHQL_AUTH_HOOK`    |
| **Accepted values** | String (URL)                  |
| **Default**         | `null`                        |
| **Supported in**    | CE, Enterprise Edition, Cloud |

:::info Note

Having an [admin secret](#admin-secret-key) set is mandatory for setting this value.

:::

### Auth Hook Mode

If you're using a [webhook for authentication](/auth/authentication/webhook.mdx), The HTTP method used by Hasura to make
requests.

|                     |                                  |
| ------------------- | -------------------------------- |
| **Flag**            | `--auth-hook-mode <GET-or-POST>` |
| **Env var**         | `HASURA_GRAPHQL_AUTH_HOOK_MODE`  |
| **Accepted values** | String (HTTP method)             |
| **Options**         | `GET` or `POST`                  |
| **Default**         | `GET`                            |
| **Supported in**    | CE, Enterprise Edition, Cloud    |

### Send Request Body to Auth Hook

Whether or not to send the request body (graphql request/variables) to the auth hook in `POST` mode.

|                     |                                                 |
| ------------------- | ----------------------------------------------- |
| **Flag**            | `--auth-hook-send-request-body <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_AUTH_HOOK_SEND_REQUEST_BODY`    |
| **Accepted values** | Boolean                                         |
| **Options**         | `true` or `false`                               |
| **Default**         | `true`                                          |
| **Supported in**    | CE, Enterprise Edition, Cloud                   |

### BigQuery String Numeric Input

Stringify certain
[BigQuery numeric types](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#numeric_types),
specifically `bignumeric`, `float64`, `int64`, `numeric` and aliases thereof, as they don't fit into the `IEEE 754` spec
for JSON encoding-decoding.

|                     |                                                |
| ------------------- | ---------------------------------------------- |
| **Flag**            | `--bigquery_string_numeric_input`              |
| **Env var**         | `HASURA_GRAPHQL_BIGQUERY_STRING_NUMERIC_INPUT` |
| **Accepted values** | Boolean                                        |
| **Options**         | `true` or `false`                              |
| **Default**         | `false`                                        |
| **Supported in**    | CE, Enterprise Edition                         |

### Cache Max Entry TTL

The maximum Query Cache TTL value in seconds, defaulting to 3600 seconds (1 hour).

|                     |                                      |
| ------------------- | ------------------------------------ |
| **Flag**            | `--query-cache-max-ttl`              |
| **Env var**         | `HASURA_GRAPHQL_CACHE_MAX_ENTRY_TTL` |
| **Accepted values** | Integer                              |
| **Default**         | `3600`                               |
| **Supported in**    | Enterprise Edition only              |

### Close WebSocket connections on metadata change

When metadata changes, close all WebSocket connections (with error code `1012`). This is useful when you want to ensure
that all clients reconnect to the latest metadata.

|                     |                                                      |
| ------------------- | ---------------------------------------------------- |
| **Flag**            | `--disable-close-websockets-on-metadata-change`      |
| **Env var**         | `HASURA_GRAPHQL_CLOSE_WEBSOCKETS_ON_METADATA_CHANGE` |
| **Accepted values** | Boolean                                              |
| **Options**         | `true` or `false`                                    |
| **Default**         | `true`                                               |
| **Supported in**    | CE, Enterprise Edition, Cloud                        |

### Configured Header Precedence

Whether the metadata configured headers are given higher precedence than client headers for
[Actions](actions/action-handlers.mdx/#add-a-header-to-your-action) and
[postgres input validations](schema/postgres/input-validations.mdx/#request).

|                     |                                               |
| ------------------- | --------------------------------------------- |
| **Flag**            | `--configured-header-precedence`              |
| **Env var**         | `HASURA_GRAPHQL_CONFIGURED_HEADER_PRECEDENCE` |
| **Accepted values** | Boolean                                       |
| **Options**         | `true` or `false`                             |
| **Default**         | `false`                                       |
| **Supported in**    | CE, Enterprise Edition, Cloud                 |

### Connections per Read-Replica

The maximum number of Postgres connections per [read-replica](databases/database-config/read-replicas.mdx) that can be
opened per stripe. When the maximum is reached we will block until a new connection becomes available, even if there is
capacity in other stripes.

|                     |                                                                 |
| ------------------- | --------------------------------------------------------------- |
| **Flag**            | `--connections-per-read-replica <NO_OF_CONNS_PER_READ_REPLICA>` |
| **Env var**         | `HASURA_GRAPHQL_CONNECTIONS_PER_READ_REPLICA`                   |
| **Accepted values** | Integer                                                         |
| **Default**         | `50`                                                            |
| **Supported in**    | Enterprise Edition only                                         |

### Console Assets Directory

By default, Console assets are loaded from a CDN. For the Console to
[load assets from the server itself](deployment/graphql-engine-flags/config-examples.mdx#console-assets-on-server)
instead of the CDN, set the value to `/srv/console-assets`.

|                     |                                         |
| ------------------- | --------------------------------------- |
| **Flag**            | `--console-assets-dir <PATH_TO_ASSETS>` |
| **Env var**         | `HASURA_GRAPHQL_CONSOLE_ASSETS_DIR`     |
| **Accepted values** | String                                  |
| **Options**         | `"/srv/console-assets"`                 |
| **Default**         | `null`                                  |
| **Supported in**    | CE, Enterprise Edition                  |

### CORS Domain

List of domains, **including scheme (http/https) and port**, to allow for CORS.  
[Wildcard domains are allowed](/deployment/graphql-engine-flags/config-examples.mdx#configure-cors), but there are
important **limitations**:

1. **Wildcard for subdomains**:

   - Wildcards (`*`) can indicate **only a single subdomain position** and must be the **starting subdomain**.
     - Example: `http://*.foo.com` will match `http://app.foo.com` but **not** `http://www.app.foo.com`.
     - Similarly, `http://www.*.foo.com` will **not** handle `http://www.app.foo.com`.
   - To allow multiple subdomains, you need to explicitly list entries for each required subdomain.
     - Example: Use `http://*.app.foo.com` and `http://*.app2.foo.com` for `http://bar.app.foo.com` and
       `http://baz.app2.foo.com`.

2. **Wildcard for ports is not supported**:
   - Ports must be specified explicitly.
     - Example: Use `http://localhost:3000` instead of `http://localhost:*`.

**Setting an empty value will block requests from all other domains.**

|                     |                                                                                             |
| ------------------- | ------------------------------------------------------------------------------------------- |
| **Flag**            | `--cors-domain <DOMAINS>`                                                                   |
| **Env var**         | `HASURA_GRAPHQL_CORS_DOMAIN`                                                                |
| **Accepted values** | String (comma separated list of domains)                                                    |
| **Default**         | **CE**, **Enterprise Edition**: `null` <br />**Cloud**: `*`                                 |
| **Example**         | `https://*.foo.bar.com:8080, http://*.localhost, http://localhost:3000, http://example.com` |
| **Supported in**    | CE, Enterprise Edition, Cloud                                                               |

:::info Note

Because the Console on Hasura Cloud runs on the 'cloud.hasura.io' domain, Hasura Cloud automatically adds it as an
allowed CORS domain. Setting an empty value will block requests from all other domains.

:::

### Dev Mode

Sets [dev mode](deployment/graphql-engine-flags/config-examples.mdx#dev-mode) for GraphQL requests, i.e. in case of
errors, includes an `internal` key in the errors extensions of the response.

|                     |                               |
| ------------------- | ----------------------------- |
| **Flag**            | `--dev-mode`                  |
| **Env var**         | `HASURA_GRAPHQL_DEV_MODE`     |
| **Accepted values** | Boolean                       |
| **Options**         | `true` or `false`             |
| **Default**         | `false`                       |
| **Supported in**    | CE, Enterprise Edition, Cloud |

### Default Naming Convention

Used to set the default [naming convention](/schema/postgres/naming-convention.mdx) for all sources.

|                     |                                            |
| ------------------- | ------------------------------------------ |
| **Flag**            | N/A                                        |
| **Env var**         | `HASURA_GRAPHQL_DEFAULT_NAMING_CONVENTION` |
| **Accepted values** | String                                     |
| **Options**         | `hasura-default` or `graphql-default`      |
| **Default**         | `hasura-default`                           |
| **Supported in**    | CE, Enterprise Edition, Cloud              |

### Disable CORS

[Disables CORS](deployment/graphql-engine-flags/config-examples.mdx#configure-cors). Hasura will not send any CORS
headers on any request.

|                     |                               |
| ------------------- | ----------------------------- |
| **Flag**            | `--disable-cors`              |
| **Env var**         | `HASURA_GRAPHQL_DISABLE_CORS` |
| **Accepted values** | Boolean                       |
| **Options**         | `true` or `false`             |
| **Default**         | `false`                       |
| **Supported in**    | CE, Enterprise Edition        |

### Disable Native Query validation

Disable validation of Native Queries against the database.

|                     |                                                  |
| ------------------- | ------------------------------------------------ |
| **Flag**            | `--disable-native-query-validation`              |
| **Env var**         | `HASURA_GRAPHQL_DISABLE_NATIVE_QUERY_VALIDATION` |
| **Accepted values** | Boolean                                          |
| **Options**         | `true` or `false`                                |
| **Default**         | `false`                                          |
| **Supported in**    | CE, Enterprise Edition, Cloud                    |

### Dynamic Secrets Allowed Path Prefix

Enables the ability to source Postgres connection strings from files on disk using
[DynamicFromFile](/api-reference/syntax-defs.mdx#pgsourceconnectioninfo), and the ability for
[Template Variables](/databases/database-config/data-connector-config.mdx#template-variables) to use the contents of
files in Data Connector configuration transforms. File paths used with these features must start with the prefix set in
this environment variable.

|                     |                                                                         |
| ------------------- | ----------------------------------------------------------------------- |
| **Flag**            | N/A                                                                     |
| **Env var**         | `HASURA_GRAPHQL_DYNAMIC_SECRETS_ALLOWED_PATH_PREFIX`                    |
| **Accepted values** | String (representing a filesystem path prefix, such as `/var/secrets/`) |
| **Default**         | `null`                                                                  |
| **Supported in**    | CE, Enterprise Edition                                                  |

### Enable Allow List

Restrict requests allowed to be executed by the GraphQL Engine to those that are part of the configured
[Allow List](/security/allow-list.mdx).

|                     |                                      |
| ------------------- | ------------------------------------ |
| **Flag**            | `--enable-allowlist <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_ENABLE_ALLOWLIST`    |
| **Accepted values** | Boolean                              |
| **Options**         | `true` or `false`                    |
| **Default**         | `false`                              |
| **Supported in**    | CE, Enterprise Edition, Cloud        |

### Enable Apollo Federation

Enables the [Apollo Federation](data-federation/apollo-federation.mdx) feature. This allows Hasura to be connected as a
subgraph in an Apollo supergraph.

|                     |                                           |
| ------------------- | ----------------------------------------- |
| **Flag**            | `--enable-apollo-federation`              |
| **Env var**         | `HASURA_GRAPHQL_ENABLE_APOLLO_FEDERATION` |
| **Accepted values** | Boolean                                   |
| **Options**         | `true` or `false`                         |
| **Default**         | `false`                                   |
| **Supported in**    | CE, Enterprise Edition, Cloud             |

### Enable Automated Persisted Queries

Enables the [Automated Persisted Queries](https://www.apollographql.com/docs/apollo-server/performance/apq/) feature.

|                     |                                           |
| ------------------- | ----------------------------------------- |
| **Flag**            | `--enable-persisted-queries`              |
| **Env var**         | `HASURA_GRAPHQL_ENABLE_PERSISTED_QUERIES` |
| **Accepted values** | Boolean                                   |
| **Default**         | `false`                                   |
| **Supported in**    | Enterprise Edition                        |

### Set Automated Persisted Queries TTL

Sets the query TTL in the cache store for Automated Persisted Queries.

|                     |                                        |
| ------------------- | -------------------------------------- |
| **Flag**            | `--persisted-queries-ttl`              |
| **Env var**         | `HASURA_GRAPHQL_PERSISTED_QUERIES_TTL` |
| **Accepted values** | Integer                                |
| **Default**         | `5` (seconds)                          |
| **Supported in**    | Enterprise Edition                     |

### Enable Error Log Level for Trigger Errors

Sets the log-level as `error` for Trigger type error logs (Event Triggers, Scheduled Triggers, Cron Triggers).

|                     |                                                  |
| ------------------- | ------------------------------------------------ |
| **Flag**            | `--enable-triggers-error-log-level`              |
| **Env var**         | `HASURA_GRAPHQL_ENABLE_TRIGGERS_ERROR_LOG_LEVEL` |
| **Accepted values** | Boolean                                          |
| **Default**         | `false`                                          |
| **Supported in**    | CE, Enterprise Edition                           |

### Enable Console

Enable the Hasura Console (served by the server on `/` and `/console`).

|                     |                                                                                    |
| ------------------- | ---------------------------------------------------------------------------------- |
| **Flag**            | `--enable-console <true-or-false>`                                                 |
| **Env var**         | `HASURA_GRAPHQL_ENABLE_CONSOLE`                                                    |
| **Accepted values** | Boolean                                                                            |
| **Options**         | `true` or `false`                                                                  |
| **Default**         | **CE**, **Enterprise Edition**: `false` <br />**Cloud**: Console is always enabled |
| **Supported in**    | CE, Enterprise Edition                                                             |

### Enable High-cardinality Labels for Metrics

Enable high-cardinality labels for [Prometheus Metrics](/observability/enterprise-edition/prometheus/metrics.mdx).
Enabling this setting will add more labels to some of the metrics (e.g. `operation_name` label for Graphql subscription
metrics).

|                     |                                                         |
| ------------------- | ------------------------------------------------------- |
| **Flag**            | N/A                                                     |
| **Env var**         | `HASURA_GRAPHQL_METRICS_ENABLE_HIGH_CARDINALITY_LABELS` |
| **Accepted values** | Boolean                                                 |
| **Options**         | `true` or `false`                                       |
| **Default**         | `true`                                                  |
| **Supported in**    | Enterprise Edition                                      |

The list of affected metrics are:

| Metric                                                                                                                                         | High Cardinality enabled                                                  | High Cardinality disabled       |
| ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------- |
| [hasura_event_queue_time_seconds](/observability/enterprise-edition/prometheus/metrics.mdx/#event-queue-time)                                  | trigger_name, source_name                                                 | None                            |
| [hasura_event_processed_total](/observability/enterprise-edition/prometheus/metrics.mdx/#event-processed-total)                                | trigger_name, source_name                                                 | None                            |
| [hasura_event_webhook_processing_time_seconds](/observability/enterprise-edition/prometheus/metrics.mdx/#event-webhook-processing-time)        | trigger_name, source_name                                                 | None                            |
| [hasura_event_processing_time_seconds](/observability/enterprise-edition/prometheus/metrics.mdx/#event-processing-time)                        | trigger_name, source_name                                                 | None                            |
| [hasura_event_invocations_total](/observability/enterprise-edition/prometheus/metrics.mdx/#event-invocations-total)                            | trigger_name, source_name                                                 | None                            |
| [hasura_graphql_requests_total](/observability/enterprise-edition/prometheus/metrics.mdx/#hasura-graphql-requests-total)                       | operation_type, response_status, parameterized_query_hash, operation_name | operation_type, response_status |
| [hasura_websocket_messages_sent_bytes_total](/observability/enterprise-edition/prometheus/metrics.mdx/#websocket-egress)                       | parameterized_query_hash, operation_name                                  | None                            |
| [hasura_subscription_total_time_seconds](/observability/enterprise-edition/prometheus/metrics.mdx#subscription-total-time)                     | subscription_kind, parameterized_query_hash, operation_name               | subscription_kind               |
| [hasura_subscription_db_execution_time_seconds](/observability/enterprise-edition/prometheus/metrics.mdx#subscription-database-execution-time) | subscription_kind, parameterized_query_hash, operation_name               | subscription_kind               |
| [hasura_active_subscriptions](/observability/enterprise-edition/prometheus/metrics.mdx#active-subscriptions)                                   | subscription_kind, parameterized_query_hash, operation_name               | subscription_kind               |

### Enable Log Compression

Enable sending compressed logs to [metrics server](/observability/enterprise-edition/prometheus/metrics.mdx).

|                     |                                            |
| ------------------- | ------------------------------------------ |
| **Flag**            | `--enable-log-compression <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_ENABLE_LOG_COMPRESSION`    |
| **Accepted values** | Boolean                                    |
| **Options**         | `true` or `false`                          |
| **Default**         | `false`                                    |
| **Supported in**    | Enterprise Edition                         |

### Enable Maintenance Mode

Enabling maintenance mode disables updating of Metadata on the server.

|                     |                                             |
| ------------------- | ------------------------------------------- |
| **Flag**            | `--enable-maintenance-mode <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_ENABLE_MAINTENANCE_MODE`    |
| **Accepted values** | Boolean                                     |
| **Options**         | `true` or `false`                           |
| **Default**         | `false`                                     |
| **Supported in**    | CE, Enterprise Edition, Cloud               |

### Enable Metadata Query Logging

Enabling this setting includes the `query` field in [http-logs](/deployment/logging.mdx#http-log-structure) for Metadata
queries.

|                     |                                                   |
| ------------------- | ------------------------------------------------- |
| **Flag**            | `--enable-metadata-query-logging <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_ENABLE_METADATA_QUERY_LOGGING`    |
| **Accepted values** | Boolean                                           |
| **Options**         | `true` or `false`                                 |
| **Default**         | `false`                                           |
| **Supported in**    | CE, Enterprise Edition                            |

### Enable Remote Schema Permissions

Enable [RBAC for Remote Schemas](/remote-schemas/auth/remote-schema-permissions.mdx)

|                     |                                                      |
| ------------------- | ---------------------------------------------------- |
| **Flag**            | `--enable-remote-schema-permissions <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS`    |
| **Accepted values** | Boolean                                              |
| **Options**         | `true` or `false`                                    |
| **Default**         | `false`                                              |
| **Supported in**    | CE, Enterprise Edition, Cloud                        |

### Enable Telemetry

Setting this enables or disables [anonymous telemetry](/policies/telemetry.mdx).

|                     |                                      |
| ------------------- | ------------------------------------ |
| **Flag**            | `--enable-telemetry <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_ENABLE_TELEMETRY`    |
| **Accepted values** | Boolean                              |
| **Options**         | `true` or `false`                    |
| **Default**         | `true`                               |
| **Supported in**    | CE, Enterprise Edition               |

### Enabled APIs

List of [APIs](/api-reference/overview.mdx) to be enabled on a Hasura GraphQL Engine instance.

|                     |                                                      |
| ------------------- | ---------------------------------------------------- |
| **Flag**            | `--enabled-apis <APIS>`                              |
| **Env var**         | `HASURA_GRAPHQL_ENABLED_APIS`                        |
| **Accepted values** | String (Comma-separated)                             |
| **Options**         | `metadata`, `graphql`, `pgdump`, `config`, `metrics` |
| **Default**         | `metadata, graphql, pgdump, config`                  |
| **Supported in**    | CE, Enterprise Edition, Cloud                        |

### Enabled Log Types

The options below represent log types on the Community Edition. Enterprise-specific log types - and descriptions of all
log types — can be found [here](/deployment/logging.mdx#log-types).

|                     |                                                                                                                                                                                                  |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Flag**            | `--enabled-log-types <LOG_TYPES>`                                                                                                                                                                |
| **Env var**         | `HASURA_GRAPHQL_ENABLED_LOG_TYPES`                                                                                                                                                               |
| **Accepted values** | String (Comma-separated)                                                                                                                                                                         |
| **Options**         | `startup`, `http-log`, `webhook-log`, `websocket-log`, `query-log`, `execution-log`, `livequery-poller-log`, `action-handler-log`, `data-connector-log`, `jwk-refresh-log`, `validate-input-log` |
| **Default**         | `startup, http-log, webhook-log, websocket-log`, `jwk-refresh-log`                                                                                                                               |
| **Supported in**    | CE, Enterprise Edition                                                                                                                                                                           |

### Events HTTP Pool Size

Maximum number of concurrent HTTP workers for event delivery.

|                     |                                        |
| ------------------- | -------------------------------------- |
| **Flag**            | `--events-http-pool-size <SIZE>`       |
| **Env var**         | `HASURA_GRAPHQL_EVENTS_HTTP_POOL_SIZE` |
| **Accepted values** | Integer                                |
| **Default**         | `100`                                  |
| **Supported in**    | CE, Enterprise Edition, Cloud          |

### Events Fetch Batch Size

The maximum number of events to be fetched from the DB in a single batch.

|                     |                                          |
| ------------------- | ---------------------------------------- |
| **Flag**            | `--events-fetch-batch-size <BATCH_SIZE>` |
| **Env var**         | `HASURA_GRAPHQL_EVENTS_FETCH_BATCH_SIZE` |
| **Accepted values** | Integer                                  |
| **Default**         | `100`                                    |
| **Supported in**    | CE, Enterprise Edition, Cloud            |

### Events Fetch Interval

The interval, in milliseconds, to sleep before trying to fetch events again after a fetch returned no events from
Postgres. Setting this value to `0` will stop event trigger processing.

|                     |                                            |
| ------------------- | ------------------------------------------ |
| **Flag**            | `--events-fetch-interval <INTERVAL_IN_MS>` |
| **Env var**         | `HASURA_GRAPHQL_EVENTS_FETCH_INTERVAL`     |
| **Accepted values** | Integer                                    |
| **Default**         | `1000`                                     |
| **Supported in**    | CE, Enterprise Edition                     |

### Experimental Features

List of experimental features to be enabled.

|                     |                                                                                                                                                                                                                                                                                                                                              |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Flag**            | `--experimental-features <FEATURES>`                                                                                                                                                                                                                                                                                                         |
| **Env var**         | `HASURA_GRAPHQL_EXPERIMENTAL_FEATURES`                                                                                                                                                                                                                                                                                                       |
| **Accepted values** | String (Comma-separated list)                                                                                                                                                                                                                                                                                                                |
| **Options**         | `inherited_roles`, `optimize_permission_filters`, `naming_convention`, `streaming_subscriptions`, `apollo_federation`, `hide_update_many_fields`, `bigquery_string_numeric_input`, `hide_aggregation_predicates`, `hide_stream_fields`, `disable_postgres_arrays`, `remove_empty_subscription_responses`, `no_null_unbound_variable_default` |
| **Default**         | `null`                                                                                                                                                                                                                                                                                                                                       |
| **Supported in**    | CE, Enterprise Edition, Cloud                                                                                                                                                                                                                                                                                                                |

### Header Size Limit

Sets the maximum cumulative length of all headers in bytes.

|                     |                                          |
| ------------------- | ---------------------------------------- |
| **Flag**            | `--max-total-header-length`              |
| **Env var**         | `HASURA_GRAPHQL_MAX_TOTAL_HEADER_LENGTH` |
| **Accepted values** | Integer                                  |
| **Default**         | `1024*1024` (1MB)                        |
| **Supported in**    | CE, Enterprise Edition                   |

### Graceful Shutdown Timeout

The timeout, expressed in seconds, to wait for in-flight events (such as [Event Triggers](/event-triggers/overview.mdx)
and [Scheduled Triggers](/scheduled-triggers/overview.mdx)) and async actions to complete before the server shuts down
completely. If the in-flight events are not completed within the timeout, those events are marked as pending.

|                     |                                                        |
| ------------------- | ------------------------------------------------------ |
| **Flag**            | `--graceful-shutdown-timeout <TIMEOUT_IN_SECONDS>`     |
| **Env var**         | `HASURA_GRAPHQL_GRACEFUL_SHUTDOWN_TIMEOUT`             |
| **Accepted values** | Integer (Representing an interval measured in seconds) |
| **Default**         | `60`                                                   |
| **Supported in**    | CE, Enterprise Edition                                 |

### Infer Function Permissions

When this is set to `false`, a function `f`, stable, immutable or volatile is only exposed for a role `r` if there is a
permission defined on the function `f` for the role `r`, creating a function permission will only be allowed if there is
a select permission on the table type.

When this is set to `true` or is omitted, the permission of the function is inferred from the select permissions from
the target table of the function, only for stable or immutable functions. Volatile functions are not exposed to any of
the roles in this case. See the
[permissions for custom functions docs](/schema/postgres/custom-functions.mdx#permissions-for-custom-functions) for more
details.

|                     |                                                |
| ------------------- | ---------------------------------------------- |
| **Flag**            | `--infer-function-permissions <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_INFER_FUNCTION_PERMISSIONS`    |
| **Accepted values** | Boolean                                        |
| **Options**         | `true` or `false`                              |
| **Default**         | `true`                                         |
| **Supported in**    | CE, Enterprise Edition, Cloud                  |

### JWT Secret

The JWT Secret variable is set equal to a JSON string containing a `type` property set equal to the method of encryption
and the JWK (`key`) used for verifying a JWT. See the [JWT docs](/auth/authentication/jwt.mdx) for more details.

|                     |                                                                |
| ------------------- | -------------------------------------------------------------- |
| **Flag**            | `--jwt-secret <JSON_CONFIG>`                                   |
| **Env var**         | `HASURA_GRAPHQL_JWT_SECRET`                                    |
| **Accepted values** | JSON                                                           |
| **Example**         | `{"type": "HS256", "key": "3bd561c37d214b4496d09049fadc542c"}` |
| **Default**         | `null`                                                         |
| **Supported in**    | CE, Enterprise Edition, Cloud                                  |

:::info Note

Having an [admin secret](#admin-secret-key) set is mandatory for setting this value.

:::

### JWT Secrets

List of [JWT secrets](/auth/authentication/multiple-jwt-secrets.mdx) to authenticate with different JWT issuers.

|                     |                                                                                                                                                                                                                                                                                       |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Flag**            | `--jwt-secrets <SECRETS>`                                                                                                                                                                                                                                                             |
| **Env var**         | `HASURA_GRAPHQL_JWT_SECRETS`                                                                                                                                                                                                                                                          |
| **Accepted values** | JSON array of objects (containing type and the JWK used for verification)                                                                                                                                                                                                             |
| **Default**         | `null`                                                                                                                                                                                                                                                                                |
| **Example**         | `[{\"type\": \"HS256\", \"key\": \"<your-hmac-shared-secret>\", \"claims_namespace\": \"<optional-custom-claims-key-name>\"}, {\"type\": \"RS256\", \"issuer\": \"my-issuer\", \"key\": \"<your-PEM-RSA-public-key>\", \"claims_namespace\": \"<optional-custom-claims-key-name>\"}]` |
| **Supported in**    | Enterprise Edition, Cloud                                                                                                                                                                                                                                                             |

:::info Note

If both JWT Secret and JWT Secrets are set, then JWT Secrets will be used.

:::

### Live Queries Multiplexed Refetch Interval

When utilizing live queries, updated results - if any - will be sent, at most, once during this interval - measured in
milliseconds - for any
[live queries which can be multiplexed](/subscriptions/observability-and-performance.mdx#parameters).

|                     |                                                                |
| ------------------- | -------------------------------------------------------------- |
| **Flag**            | `--live-queries-multiplexed-refetch-interval <INTERVAL_IN_MS>` |
| **Env var**         | `HASURA_GRAPHQL_LIVE_QUERIES_MULTIPLEXED_REFETCH_INTERVAL`     |
| **Accepted values** | Integer (Representing an interval measured in milliseconds)    |
| **Default**         | `1000`                                                         |
| **Supported in**    | CE, Enterprise Edition, Cloud                                  |

### Log Level

This variable sets the level for [Hasura's logs](/deployment/logging.mdx#logging-levels).

|                     |                                                                         |
| ------------------- | ----------------------------------------------------------------------- |
| **Flag**            | `--log-level <LEVEL>`                                                   |
| **Env var**         | `HASURA_GRAPHQL_LOG_LEVEL`                                              |
| **Accepted values** | String                                                                  |
| **Options**         | `debug`, `info`, `warn`, `error`                                        |
| **Default**         | `info`                                                                  |
| **Supported in**    | **CE**, **Enterprise Edition**<br/>**Cloud**: can only be set to `info` |

### Max Cache Size

The [maximum cache size](/caching/enterprise-caching.mdx), measured in MB, for queries.

|                     |                                                                                        |
| ------------------- | -------------------------------------------------------------------------------------- |
| **Flag**            | `--max-cache-size <SIZE_IN_MB>`                                                        |
| **Env var**         | `HASURA_GRAPHQL_MAX_CACHE_SIZE`                                                        |
| **Accepted values** | Integer (Representing cache size measured in MB)                                       |
| **Default**         | `1`                                                                                    |
| **Supported in**    | **Enterprise Edition**, **Cloud**: Professional tier is set to `100` MB as the default |

### Metadata Database Extension Schema

The schema in which Hasura can install extensions in the Metadata database.

|                     |                                                       |
| ------------------- | ----------------------------------------------------- |
| **Flag**            | `--metadata-database-extensions-schema <SCHEMA_NAME>` |
| **Env var**         | `HASURA_GRAPHQL_METADATA_DATABASE_EXTENSIONS_SCHEMA`  |
| **Accepted values** | String                                                |
| **Default**         | `public`                                              |
| **Supported in**    | CE, Enterprise Edition                                |

### Multiplexed Batch Size

Multiplexed live queries are split into
[batches of the specified size](/deployment/performance-tuning.mdx#hasura_graphql_live_queries_multiplexed_batch_size).

|                     |                                                      |
| ------------------- | ---------------------------------------------------- |
| **Flag**            | `--live-queries-multiplexed-batch-size <BATCH_SIZE>` |
| **Env var**         | `HASURA_GRAPHQL_LIVE_QUERIES_MULTIPLEXED_BATCH_SIZE` |
| **Accepted values** | Integer                                              |
| **Default**         | `100`                                                |
| **Supported in**    | CE, Enterprise Edition, Cloud                        |

### Null in Non-nullable Variables

GraphQL query validation is fixed in [`v2.36.0-beta.1`](https://hasura.io/changelog/community-edition/v2.36.0-beta.1),
where queries that assigned a `null` value to variables with non-nullable type were allowed.

Example:

```graphql
query ($user_id: Int!) {
  users(where: { id: { _eq: $user_id } }) {
    id
    name
  }
}
```

variables

```json
{
  "user_id": null
}
```

To rollback to the old behavior, i.e., allow `null` value for non-nullable variables, use this option.

|                     |                                                                 |
| ------------------- | --------------------------------------------------------------- |
| **Flag**            | `--null-in-nonnullable-variables <true-or-false>`               |
| **Env var**         | `HASURA_GRAPHQL_BACKWARDS_COMPAT_NULL_IN_NONNULLABLE_VARIABLES` |
| **Accepted values** | Boolean                                                         |
| **Options**         | `true` or `false`                                               |
| **Default**         | `false`                                                         |
| **Supported in**    | CE, Enterprise Edition, Cloud - from `v2.36.0-beta.1`           |

### Number of Retries

:::warning Notice

**Deprecated in versions > `v2.0.0`: [see details](/resources/upgrade-hasura-v2.mdx#hasura-v2-env-changes).**

:::

The number of retries if a Postgres connection error occurs.

|                     |                                   |
| ------------------- | --------------------------------- |
| **Flag**            | `--retries <NO_OF_RETRIES>`       |
| **Env var**         | `HASURA_GRAPHQL_NO_OF_RETRIES`    |
| **Accepted values** | Integer                           |
| **Default**         | `1`                               |
| **Supported in**    | Deprecated in versions > `v2.0.0` |

### Number of Stripes

:::warning Notice

**Deprecated in versions > `v2.0.0`: [see details](/resources/upgrade-hasura-v2.mdx#hasura-v2-env-changes).**

:::

The number of stripes (distinct sub-pools) to maintain with Postgres. New connections will be taken from a particular
stripe pseudo-randomly.

|                     |                                 |
| ------------------- | ------------------------------- |
| **Flag**            | `-s, --stripes <NO_OF_STRIPES>` |
| **Env var**         | `HASURA_GRAPHQL_PG_STRIPES`     |
| **Accepted values** | Integer                         |
| **Default**         | `1`                             |
| **Supported in**    | CE, Enterprise Edition          |

### PG Connections

:::warning Notice

**Deprecated in versions > `v2.0.0`: [see details](/resources/upgrade-hasura-v2.mdx#hasura-v2-env-changes).**

:::

The maximum number of Postgres connections that can be opened per stripe. When the maximum is reached we will block
connections until a new connection becomes available, even if there is capacity in other stripes.

|                     |                                   |
| ------------------- | --------------------------------- |
| **Flag**            | `-c, --connections <NO_OF_CONNS>` |
| **Env var**         | `HASURA_GRAPHQL_PG_CONNECTIONS`   |
| **Accepted values** | Integer                           |
| **Default**         | `50`                              |
| **Supported in**    | Deprecated in versions > `v2.0.0` |

### PG Connection Lifetime

:::warning Notice

In versions > `v2.0.0` this affects only connections to the postgres database used for the metadata catalog.
The equivalent setting for data sources is now `connection_info > pool_settings > connection_lifetime` in the
metadata.

:::

Time from connection creation, **in seconds**, after which the connection should be destroyed and a new one created. A
value of `0` indicates Hasura should never destroy an active connection. If `0` is passed, memory from large query
results may not be reclaimed.

|                     |                                                        |
| ------------------- | ------------------------------------------------------ |
| **Flag**            | `--conn-lifetime <TIME_IN_SECONDS>`                    |
| **Env var**         | `HASURA_GRAPHQL_PG_CONN_LIFETIME`                      |
| **Accepted values** | Integer (Representing an interval measured in seconds) |
| **Default**         | `600`                                                  |
| **Supported in**    | Deprecated in versions > `v2.0.0`                      |

### Pool Timeout

:::warning Notice

**Deprecated in versions > `v2.0.0`: [see details](/resources/upgrade-hasura-v2.mdx#hasura-v2-env-changes).**

:::

Pool Timeout determines, in seconds, how long to wait when acquiring a Postgres connection.

|                     |                                                        |
| ------------------- | ------------------------------------------------------ |
| **Flag**            | `--pool-timeout <TIME_IN_SECONDS>`                     |
| **Env var**         | `HASURA_GRAPHQL_POOL_TIMEOUT`                          |
| **Accepted values** | Integer (Representing an interval measured in seconds) |
| **Default**         | Forever                                                |
| **Supported in**    | Deprecated in versions > `v2.0.0`                      |

### Postgres SSL Certificate Path

The path for storage of Postgres SSL certificates when set via environment variable reference.

|                     |                                          |
| ------------------- | ---------------------------------------- |
| **Flag**            | `--pg-ssl-certificate-path <DIRECTORY>`  |
| **Env var**         | `HASURA_GRAPHQL_PG_SSL_CERTIFICATE_PATH` |
| **Accepted values** | String (Representing a file path)        |
| **Default**         | `null`                                   |
| **Supported in**    | Enterprise Edition only                  |

### Postgres Timeout

:::warning Notice

**Deprecated in versions > `v2.0.0`: [see details](/resources/upgrade-hasura-v2.mdx#hasura-v2-env-changes).**

:::

Each connection's idle time, measured in seconds, before it's closed.

|                     |                                                        |
| ------------------- | ------------------------------------------------------ |
| **Flag**            | `--timeout <TIME_IN_SECONDS>`                          |
| **Env var**         | `HASURA_GRAPHQL_PG_TIMEOUT`                            |
| **Accepted values** | Integer (Representing an interval measured in seconds) |
| **Default**         | `180`                                                  |
| **Supported in**    | Deprecated in versions > `v2.0.0`                      |

### Preserve 401 Errors

Preserves HTTP 401 (Unauthorized) status codes from webhook auth responses and JWT auth failures. By default, all GraphQL errors are returned with HTTP status code 200, even authentication errors. When enabled, 401 errors will be propagated back to the client.

|                     |                                                  |
| ------------------- | ------------------------------------------------ |
| **Flag**            | `--preserve-401-errors`                          |
| **Env var**         | `HASURA_GRAPHQL_PRESERVE_401_ERRORS`             |
| **Accepted values** | Boolean                                          |
| **Options**         | `true` or `false`                                |
| **Default**         | `false`                                          |
| **Supported in**    | CE, Enterprise Edition                           |

### Query Plan Cache Size

:::warning Notice

**Deprecated in versions > `v2.0.0`: [see details](/resources/upgrade-hasura-v2.mdx#hasura-v2-env-changes).**

:::

The maximum number of query plans that can be cached, where `0` disables the cache.

|                     |                                        |
| ------------------- | -------------------------------------- |
| **Flag**            | `--query-plan-cache-size <SIZE>`       |
| **Env var**         | `HASURA_GRAPHQL_QUERY_PLAN_CACHE_SIZE` |
| **Accepted values** | Integer                                |
| **Default**         | `4000`                                 |
| **Options**         | `0`-`65535`                            |
| **Supported in**    | Deprecated in versions > `v2.0.0`      |

### Rate-Limit Redis TLS Hostname

The hostname to use for SNI when connecting to a rate-limiting
[Redis instance over TLS](/caching/enterprise-caching.mdx).

|                     |                                                |
| ------------------- | ---------------------------------------------- |
| **Flag**            | `--rate-limit-redis-tls-hostname <HOSTNAME>`   |
| **Env var**         | `HASURA_GRAPHQL_RATE_LIMIT_REDIS_TLS_HOSTNAME` |
| **Accepted values** | String                                         |
| **Default**         | `null`                                         |
| **Supported in**    | Enterprise Edition only                        |

### Rate-Limit Redis URL

The [Redis URL](/caching/enterprise-caching.mdx) to use for rate limiting.

|                     |                                          |
| ------------------- | ---------------------------------------- |
| **Flag**            | `--rate-limit-redis-url <URL>`           |
| **Env var**         | `HASURA_GRAPHQL_RATE_LIMIT_REDIS_URL`    |
| **Accepted values** | String                                   |
| **Example**         | `redis://username:password@host:port/db` |
| **Default**         | `null`                                   |
| **Supported in**    | Enterprise Edition only                  |

### Rate-Limit Redis Use TLS

Whether to use TLS to connect to a caching [Redis instance](/caching/enterprise-caching.mdx).

|                     |                                              |
| ------------------- | -------------------------------------------- |
| **Flag**            | `--rate-limit-redis-use-tls <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_RATE_LIMIT_REDIS_USE_TLS`    |
| **Accepted values** | Boolean                                      |
| **Options**         | `true` or `false`                            |
| **Default**         | `false`                                      |
| **Supported in**    | Enterprise Edition only                      |

### Read Replica URL

The [URL for a read replica](/databases/database-config/read-replicas.mdx#adding-read-replica-urls) of the database.

:::warning Notice

**Deprecated in versions > `v2.0.0`: [see details](/resources/upgrade-hasura-v2.mdx#hasura-v2-env-changes).**

:::

|                     |                                         |
| ------------------- | --------------------------------------- |
| **Flag**            | `--read-replica-url <READ_REPLICA_URL>` |
| **Env var**         | `HASURA_GRAPHQL_READ_REPLICA_URL`       |
| **Accepted values** | String                                  |
| **Default**         | `null`                                  |
| **Supported in**    | Deprecated in versions > `v2.0.0`       |

### Redis Timeout

The timeout for redis queries while serving requests. The timeout is in seconds.

|                     |                                               |
| ------------------- | --------------------------------------------- |
| **Flag**            | N/A                                           |
| **Env var**         | `HASURA_GRAPHQL_REDIS_TIMEOUT`                |
| **Accepted values** | Integer (Representing an interval in seconds) |
| **Default**         | `null` (No timeout)                           |
| **Supported in**    | Enterprise Edition only                       |

### Redis no-fail on Startup

Whether to proceed if redis is unavailable at engine startup. If set to `true` and there are issues with redis on
startup then the server will start as though caching and rate limiting were disabled until the next engine restart. A
startup log message will be displayed in this case mentioning "redis operation failed".

|                     |                                           |
| ------------------- | ----------------------------------------- |
| **Flag**            | `--redis-no-fail-on-startup`              |
| **Env var**         | `HASURA_GRAPHQL_REDIS_NO_FAIL_ON_STARTUP` |
| **Accepted values** | Boolean                                   |
| **Options**         | `true` or `false`                         |
| **Default**         | `false`                                   |
| **Supported in**    | Enterprise Edition only                   |

### Redis TLS Hostname

The hostname to use for SNI when connecting to a [caching Redis instance over TLS](/caching/enterprise-caching.mdx).

|                     |                                     |
| ------------------- | ----------------------------------- |
| **Flag**            | `--redis-tls-hostname <HOSTNAME>`   |
| **Env var**         | `HASURA_GRAPHQL_REDIS_TLS_HOSTNAME` |
| **Accepted values** | String                              |
| **Default**         | `null`                              |
| **Supported in**    | Enterprise Edition only             |

### Redis TLS Shared CA Store Path

The path to a shared CA store to use to connect to both (caching and rate-limiting)
[Redis URLs over TLS](/caching/enterprise-caching.mdx).

|                     |                                                              |
| ------------------- | ------------------------------------------------------------ |
| **Flag**            | `--redis-tls-shared-ca-store-path <PATH_TO_SHARED_CA_STORE>` |
| **Env var**         | `HASURA_GRAPHQL_REDIS_TLS_SHARED_CA_STORE_PATH`              |
| **Accepted values** | String                                                       |
| **Default**         | `null`                                                       |
| **Supported in**    | Enterprise Edition only                                      |

### Redis URL

The Redis URL to use for [query caching](/caching/enterprise-caching.mdx) and
[Webhook Auth Caching](/auth/authentication/webhook.mdx#webhook-auth-caching).

|                     |                                          |
| ------------------- | ---------------------------------------- |
| **Flag**            | `--redis-url <URL>`                      |
| **Env var**         | `HASURA_GRAPHQL_REDIS_URL`               |
| **Accepted values** | String                                   |
| **Default**         | `null`                                   |
| **Example**         | `redis://username:password@host:port/db` |
| **Supported in**    | Enterprise Edition only                  |

### Remote Schema prioritize data

Setting this will prioritize `data` or `errors` if both fields are present in the Remote Schema response.

|                     |                                                |
| ------------------- | ---------------------------------------------- |
| **Flag**            | `--remote-schema-prioritize-data`              |
| **Env var**         | `HASURA_GRAPHQL_REMOTE_SCHEMA_PRIORITIZE_DATA` |
| **Accepted values** | Boolean                                        |
| **Options**         | `true` or `false`                              |
| **Default**         | `false`                                        |
| **Supported in**    | CE, Enterprise Edition, Cloud                  |

### Schema Sync Poll Interval

The interval, in milliseconds, to poll Metadata storage for updates. To disable, set this value to `0`.

|                     |                                                    |
| ------------------- | -------------------------------------------------- |
| **Flag**            | `--schema-sync-poll-interval <INTERVAL_IN_MS>`     |
| **Env var**         | `HASURA_GRAPHQL_SCHEMA_SYNC_POLL_INTERVAL`         |
| **Accepted values** | Integer (Representing an interval in milliseconds) |
| **Default**         | `1000`                                             |
| **Supported in**    | CE, Enterprise Edition                             |

### Server Host

The host on which `graphql-engine` will listen. The default is `*`.

|                     |                                                                          |
| ------------------- | ------------------------------------------------------------------------ |
| **Flag**            | `--server-host <HOST>`                                                   |
| **Env var**         | `HASURA_GRAPHQL_SERVER_HOST`                                             |
| **Accepted values** | String                                                                   |
| **Default**         | **CE, Enterprise Edition**: `*` <br />**Cloud**: managed by Hasura Cloud |
| **Supported in**    | CE, Enterprise Edition                                                   |

### Server Port

The port on which `graphql-engine` should be served.

|                     |                                                                             |
| ------------------- | --------------------------------------------------------------------------- |
| **Flag**            | `--server-port <PORT>`                                                      |
| **Env var**         | `HASURA_GRAPHQL_SERVER_PORT`                                                |
| **Accepted values** | Integer                                                                     |
| **Default**         | **CE, Enterprise Edition**: `8080` <br />**Cloud**: managed by Hasura Cloud |
| **Supported in**    | CE, Enterprise Edition                                                      |

### Single Sign-on Providers

List of third-party identity providers to enable Single Sign-on authentication for the console.

|                     |                                                                                                                                                                                                                                                                                                                      |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Flag**            | `--sso-providers <JSON_CONFIG>`                                                                                                                                                                                                                                                                                      |
| **Env var**         | `HASURA_GRAPHQL_SSO_PROVIDERS`                                                                                                                                                                                                                                                                                       |
| **Accepted values** | JSON array of objects (containing identity provider configs and the JWK used for verification)                                                                                                                                                                                                                       |
| **Default**         | `null`                                                                                                                                                                                                                                                                                                               |
| **Example**         | `[{\"client_id\": \"<client-id-from-idp>\", \"name\": \"<display-name>\", \"scope\": \"openid\", \"authorization_url\": \"<login-url>\", \"request_token_url\": \"<request-token-url>\", \"admin_roles\": [\"admin\"], \"jwt_secret\": {\"type\": \"RS256\", \"jwk_url\": \"https://...\", \"issuer\": \"myapp\"}}]` |
| **Supported in**    | Enterprise Edition                                                                                                                                                                                                                                                                                                   |

### Skip Arguments with `null` Values for Remote Schema

Skip arguments with `null` values while resolving fields from Remote Schemas. For instance:

```graphql
query RemoteQuery {
  users(type:null) {
    id
    ...
  }
}
```

is forwarded as:

```graphql
query RemoteQuery {
  users {
    id
    ...
  }
}
```

|                     |                                           |
| ------------------- | ----------------------------------------- |
| **Flag**            | `--remote-schema-skip-nulls`              |
| **Env var**         | `HASURA_GRAPHQL_REMOTE_SCHEMA_SKIP_NULLS` |
| **Accepted values** | Boolean                                   |
| **Options**         | `true` or `false`                         |
| **Default**         | `false`                                   |
| **Supported in**    | CE, Enterprise Edition, Cloud             |

### Streaming Queries Multiplexed Batch Size

Multiplexed [streaming queries](/subscriptions/postgres/streaming/index.mdx) are split into batches of the specified
size.

|                     |                                                           |
| ------------------- | --------------------------------------------------------- |
| **Flag**            | `--streaming-queries-multiplexed-batch-size <SIZE>`       |
| **Env var**         | `HASURA_GRAPHQL_STREAMING_QUERIES_MULTIPLEXED_BATCH_SIZE` |
| **Accepted values** | Integer                                                   |
| **Default**         | `100`                                                     |
| **Supported in**    | CE, Enterprise Edition                                    |

### Streaming Queries Multiplexed Refetch Interval

For [streaming queries](/subscriptions/postgres/streaming/index.mdx) which can be multiplexed, updated results - if
any - will be sent, at most, once during this interval.

|                     |                                                                     |
| ------------------- | ------------------------------------------------------------------- |
| **Flag**            | `--streaming-queries-multiplexed-refetch-interval <INTERVAL_IN_MS>` |
| **Env var**         | `HASURA_GRAPHQL_STREAMING_QUERIES_MULTIPLEXED_REFETCH_INTERVAL`     |
| **Accepted values** | Integer (Representing an interval in milliseconds)                  |
| **Default**         | `1000`                                                              |
| **Supported in**    | CE, Enterprise Edition                                              |

### Stringify Numeric Types

Stringify certain [Postgres numeric types](/schema/postgres/postgresql-types.mdx), specifically `bigint` ,`numeric`
,`decimal` and `double precision` as they don't fit into the `IEEE-754` spec for JSON encoding-decoding.

|                     |                                          |
| ------------------- | ---------------------------------------- |
| **Flag**            | `--stringify-numeric-types`              |
| **Env var**         | `HASURA_GRAPHQL_STRINGIFY_NUMERIC_TYPES` |
| **Accepted values** | Boolean                                  |
| **Options**         | `true` or `false`                        |
| **Default**         | `false`                                  |
| **Supported in**    | CE, Enterprise Edition, Cloud            |

### Stripes per Read Replica

:::warning Notice

**Deprecated in versions > `v2.0.0`: [see details](/resources/upgrade-hasura-v2.mdx#hasura-v2-env-changes).**

:::

The number of stripes (connection pools) to maintain per [read replica](/databases/database-config/read-replicas.mdx).

|                     |                                           |
| ------------------- | ----------------------------------------- |
| **Flag**            | `--stripes-per-read-replica <NUMBER>`     |
| **Env var**         | `HASURA_GRAPHQL_STRIPES_PER_READ_REPLICA` |
| **Accepted values** | Integer                                   |
| **Default**         | `null`                                    |
| **Supported in**    | Deprecated in versions > `v2.0.0`         |

### Transaction Isolation

:::warning Notice

**Deprecated in versions > `v2.0.0`: [see details](/resources/upgrade-hasura-v2.mdx#hasura-v2-env-changes).**

:::

This sets transaction isolation.

|                     |                                                     |
| ------------------- | --------------------------------------------------- |
| **Flag**            | `-i, --tx-iso <TXISO>`                              |
| **Env var**         | `HASURA_GRAPHQL_TX_ISOLATION`                       |
| **Accepted values** | String                                              |
| **Options**         | `read-committed`, `repeatable-read`, `serializable` |
| **Default**         | `read-committed`                                    |
| **Supported in**    | Deprecated in versions > `v2.0.0`                   |

### Trace SQL and GraphQL Queries

Add SQL and GraphQL queries to the OTLP traces.

|                     |                                       |
| ------------------- | ------------------------------------- |
| **Flag**            | `--trace-sql-query`                   |
| **Env var**         | `HASURA_GRAPHQL_ENABLE_QUERY_TRACING` |
| **Accepted values** | Boolean                               |
| **Options**         | `true` or `false`                     |
| **Default**         | `false`                               |
| **Supported in**    | Enterprise Edition, Cloud             |

### Unauthorized Role

This identifies an [unauthorized role](/auth/authentication/unauthenticated-access.mdx), used when the
`x-hasura-admin-key` is not sent or the `Authorization` header is absent in JWT mode.

|                     |                                                                                                                                   |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **Flag**            | `--unauthorized-role <ROLE>`                                                                                                      |
| **Env var**         | `HASURA_GRAPHQL_UNAUTHORIZED_ROLE`                                                                                                |
| **Accepted values** | String                                                                                                                            |
| **Example**         | Setting this value to `anonymous`, whenever the `Authorization` header is absent, the request's role will default to `anonymous`. |
| **Default**         | `null`                                                                                                                            |
| **Supported in**    | CE, Enterprise Edition, Cloud                                                                                                     |

### Use Prepared Statements

:::warning Notice

**Deprecated in versions > `v2.0.0`: [see details](/resources/upgrade-hasura-v2.mdx#hasura-v2-env-changes).**

:::

Whether to use prepared statements for queries.

|                     |                                             |
| ------------------- | ------------------------------------------- |
| **Flag**            | `--use-prepared-statements <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_USE_PREPARED_STATEMENTS`    |
| **Accepted values** | Boolean                                     |
| **Options**         | `true` or `false`                           |
| **Default**         | `true`                                      |
| **Supported in**    | Deprecated in versions > `v2.0.0`           |

### v1 Boolean Null Collapse

Evaluate `null` values in `where` input object to `True` instead of `error`. Learn more in our
[upgrade guide](/hasura-cloud/projects/move-project-v2.mdx#sub-tasks-1).

|                     |                                              |
| ------------------- | -------------------------------------------- |
| **Flag**            | `--v1-boolean-null-collapse <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_V1_BOOLEAN_NULL_COLLAPSE`    |
| **Accepted values** | Boolean                                      |
| **Options**         | `true` or `false`                            |
| **Default**         | `false`                                      |
| **Supported in**    | CE, Enterprise Edition, Cloud                |

### Websocket Compression

Enable WebSocket `permessage-deflate` compression.

|                     |                                           |
| ------------------- | ----------------------------------------- |
| **Flag**            | `--websocket-compression <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_CONNECTION_COMPRESSION`   |
| **Accepted values** | Boolean                                   |
| **Options**         | `true` or `false`                         |
| **Default**         | `false`                                   |
| **Supported in**    | CE, Enterprise Edition                    |

### Websocket Connection Init Timeout

Used to set the connection initialization timeout for GraphQL subscription protocols (`graphql-transport-ws` and
`subscriptions-transport-ws`).

|                     |                                                            |
| ------------------- | ---------------------------------------------------------- |
| **Flag**            | `--websocket-connection-init-timeout <TIMEOUT_IN_SECONDS>` |
| **Env var**         | `HASURA_GRAPHQL_WEBSOCKET_CONNECTION_INIT_TIMEOUT`         |
| **Accepted values** | Integer (Representing a timeout in milliseconds)           |
| **Default**         | `3`                                                        |
| **Supported in**    | CE, Enterprise Edition                                     |

### Websocket Keepalive

Used to set the `Keep Alive` delay for clients that use the `subscriptions-transport-ws` (Apollo) protocol. For
`graphql-ws` clients, the `graphql-engine` sends `PING` messages instead.

|                     |                                           |
| ------------------- | ----------------------------------------- |
| **Flag**            | `--websocket-keepalive <TIME_IN_SECONDS>` |
| **Env var**         | `HASURA_GRAPHQL_WEBSOCKET_KEEPALIVE`      |
| **Accepted values** | Integer (Representing a delay in seconds) |
| **Default**         | `5`                                       |
| **Supported in**    | CE, Enterprise Edition                    |

### WS Read Cookie

[Read cookie on WebSocket](/subscriptions/postgres/index.mdx#cookies-and-websockets) initial handshake even when CORS is
disabled. **This can be a potential security flaw!** This configuration is only applicable when CORS is disabled.

|                     |                                    |
| ------------------- | ---------------------------------- |
| **Flag**            | `--ws-read-cookie <true-or-false>` |
| **Env var**         | `HASURA_GRAPHQL_WS_READ_COOKIE`    |
| **Accepted values** | Boolean                            |
| **Default**         | `false`                            |
| **Options**         | `true` or `false`                  |
| **Supported in**    | CE, Enterprise Edition             |

</div>
